package org.robert.export_client.easyexcel.entity;

import lombok.Data;
import org.apache.commons.lang.StringUtils;
import org.robert.export_client.aop.ExcelDictAdapter;

import java.util.Map;

/**
 * @Description
 * @Author robert
 * @Date 2024/1/13 16:11
 **/
@Data
public abstract class DataRequest<T> {

    public String fileName = String.valueOf(System.currentTimeMillis());

    public String sheetName = "Sheet1";

    public Class<T> clazz;

    /**
     * 数据字典集，配合注解使用
     */
    public Map<String, Map<String, String>> dictMap;

    public ExcelDictAdapter<T> checker;


    public boolean check(){
        return !(this.clazz == null || StringUtils.isBlank(sheetName)
                || StringUtils.isBlank(fileName));
    }
}
